﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using CustomConverters;

namespace MappingTest.Sources
{


    [ValueConversion(typeof(int), typeof(String))]
    public class Converter1 : IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value.ToString();
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return int.Parse(value as string);
        }

    }

    public class Converter3 : IConverter<int, String>
    {

        public string Convert(int value, object parameter, System.Globalization.CultureInfo culture)
        {
            return value.ToString();
        }

        public int ConvertBack(string value, object parameter, System.Globalization.CultureInfo culture)
        {
            return int.Parse(value as string);
        }

    }

}
